package com.aba.hos.pat;

import com.aba.hos.doc.entity.Patient;

import java.util.ArrayList;
import java.util.List;

public class PatientService {
    private List<Patient> patientList = new ArrayList<>();
    private List<PatWard> wardList = new ArrayList<>();


    // 初始化病房数据，可优化为支持外部传入数据初始化
    public void initWards() {
        wardList.add(new PatWard("101", "普通病房"));
        wardList.add(new PatWard("102", "单人病房"));
        wardList.add(new PatWard("201", "重症病房"));
    }

    // 查找病房方法
    public void findWards(String wardType) {
        boolean found = false;
        for (PatWard ward : wardList) {
            if (ward.getWardType().equals(wardType)) {
                System.out.println("找到 " + wardType + "：病房号 " + ward.getWardNumber());
                found = true;
            }
        }
        if (!found) {
            System.out.println("未找到 " + wardType + " 的病房。");
        }
    }

}